<template>
  <div class="demo">
    <AfastTreeDemo v-model:active="active" @click="onclick" :data="data"></AfastTreeDemo>
    <AfastTreeDemo :data="data">
      <template #default="a">
        aa:{{ a.data.id }}
      </template>
    </AfastTreeDemo>
  </div>
</template>
<script setup lang="ts">
import AfastTreeDemo from '@/components/a/AfastTree.vue'
import { ref } from 'vue'
const onclick = (data: any) => {
  console.log(data);

}
const active = ref('')
const data = ref<TreeNode>({
  id: 1,
  label: '11111',
  children: [
    {
      id: 2,
      label: '22222',
      children: [
        {
          id: 3,
          label: '3333',
          children: []
        }
      ]
    }, {
      id: 4,
      label: 'a',
      children: []
    }
  ]
})
</script>
<style lang="scss">
.demo {
  overflow: auto;
  width: 90px;
  background: red;
}
</style>
